<%@ page language="java" contentType="text/html; charset=utf-8"  pageEncoding="utf-8"%>

<!DOCTYPE html>
<html lang="zh-cn">

	<head>
		<meta charset="utf-8">
		<meta http-equiv="X-UA-Compatible" content="IE=edge,Chrome=1">
		<meta name="viewport" content="width=device-width,initial-scale=1">
	    <script src="resources/js/jquery-1.11.3.min.js"></script>
	    <link href="resources/js/bootstrap-validator/dist/css/bootstrapValidator.css" rel="stylesheet">
	    <script src="resources/js/bootstrap-validator/dist/js/bootstrapValidator.js"></script>
		<script src="resources/js/ajaxfileupload.js"></script>
		<script src="resources/js/common.js"></script>
		<script src="resources/js/md5.js"></script>

	</head>

	<body>
	
	
	
	<form id="addForm"  method="post" >
		
			文件名 <input type="text" name="fileName"/>
			文件大小 <input type="text" name="fileSize"/>
			文件1<input type="file" id='file1' name="files"/>
			文件2<input type="file" id="file2" name="files"/>
			文件2<input type="file" id="file3" name="files"/>
			证件2<input type="file" id="cardFile" name="cardFile"/>

		</form>
					
	    <input type="button" onclick="uploadFile('addForm');" value="提交">	 
	</body>	
	
	
	<form action="/Account/Register" method="post" id="registerForm">
    @Html.AntiForgeryToken()
    <div style="margin:0 auto; width:400px;">
        <div class="form-group">
            <label> Email：</label>
            <input type="text" name="email" id="txtEmail" class="form-control" />
        </div>
        <div class="form-group">
            <label> 用户名：</label>
            <input type="text" name="Username" id="txtRegisterUsername" class="form-control" />
        </div>
        <div class="form-group">
            <label> 密  码：</label>
            <input type="password" name="Password" id="txtRegisterPassword" class="form-control" />
        </div>
        <div class="form-group">
            <label> 密码重复：</label>
            <input type="password" name="Confirm" id="txtConfirm" class="form-control" />
        </div>
        <button type="submit" id="btnRegister" class="btn btn-primary">注册</button>
        <button type="reset" class="btn btn-default" id="btnRegister">重置</button>
    </div>
</form>
	
				
	
	<script type="text/javascript">
	    $(function(){
	    	$('#registerForm').bootstrapValidator({
	            message: '这个值没有被验证',
	            feedbackIcons: {
	                valid: 'glyphicon glyphicon-ok',
	                invalid: 'glyphicon glyphicon-remove',
	                validating: 'glyphicon glyphicon-refresh'
	            },
	            fields: {
	                email: {
	                    validators: {
	                        notEmpty: {
	                            message: '邮箱是必填项'
	                        },
	                        emailAddress: {
	                            message: '邮箱格式正确'
	                        }
	                    }
	                },
	                Username: {
	                    message: '用户名还没有验证',
	                    validators: {
	                        notEmpty: {
	                            message: '用户名不能为空'
	                        },
	                        stringLength: {
	                            min: 1,
	                            max: 16,
	                            message: '用户名长度在1到16位之间'
	                        }
	                    }
	                },
	                Password: {
	                    message: '密码还没有验证',
	                    validators: {
	                        notEmpty: {
	                            message: '密码不能为空'
	                        },
	                        stringLength: {
	                            min: 6,
	                            max: 16,
	                            message: '密码长度在6到16之间'
	                        },
	                        different: {
	                            field: 'Username',
	                            message: '密码不能和用户名相同'
	                        }
	                    }
	                },
	                Confirm: {
	                    message: '密码重复还没有验证',
	                    validators: {
	                        notEmpty: {
	                            message: '密码重复不能为空'
	                        },
	                        stringLength: {
	                            min: 6,
	                            max: 16,
	                            message: '密码长度在6到16之间'
	                        },
	                        identical: {
	                            field: 'Password',
	                            message: '两次密码不同请重新输入'
	                        }
	                    }
	                }
	            }
	        }).on('success.form.bv', function (e) {
	            // Prevent form submission
	            e.preventDefault();
	            // Get the form instance
	            var $form = $(e.target);
	            // Get the BootstrapValidator instance
	            var bv = $form.data('bootstrapValidator').isValid();
	            alert(bv);

	    	
	        });
	    });
	
	    
	</script>
</html>



